
<div class="easyui-layout" style="height:100%;">
    <div region="north" style="height:94px">
        <link href="css/_Partialtool.css" rel="stylesheet"/>
        <div id="BodyContentTool">
            <div id="btnButton">
                <div class="comboelse" style="padding:5px 5px 5px 0;">
                    <input class='easyui-datebox txt350' id='EffectiveTtime' editable='false' buttonText='发布日期起'/>
                    <input class='easyui-datebox txt350' id='EffectiveTtime1' editable='false' buttonText='发布日期止'/>
                    <input class='easyui-datebox txt350' id='EffectiveTtime2' editable='false' buttonText='更新日期起'/>
                    <input class='easyui-datebox txt350' id='EffectiveTtime3' editable='false' buttonText='更新日期止'/>
                </div>
                <ul>
                    <li><input id="serchText" class="easyui-searchbox search" style="height:32px;width:500px;"
                               data-options="prompt:'支持标题、发布人、标签模糊查询',searcher:function(){}"/></li>
                    <li><input class="easyui-switchbutton" checked>&nbsp;只显示更新</li>
                </ul>
            </div>
        </div>
    </div>
    <div region="west" style="width:200px;border-right:1px solid #CCC; overflow:hidden;">
        <ul class="easyui-tree"
            data-options="url:'customer/LSSyylb_tree_data.json',method:'get',animate:true,fit:true"></ul>
    </div>

    <div region="center">
        <div id="BodyContentDiv">
            <table class="easyui-datagrid"
                   data-options="
                    iconCls: 'icon-view',
                    width: function () { return document.body.clientWidth * 0.9 },
                    nowrap: true,
                    autoRowHeight: true,
                    striped: true,
                    collapsible: false,
                    pagination: true,
                    pageSize: 10,
                    pageList: [10, 20, 30],
                    rownumbers: true,
                    sortOrder: 'desc',
                    remoteSort: false,
                    singleSelect: false,
                    queryParams: {},
                    animate: true,
                    url:'customer/LSSyylb_data.json',
                    method:'get',
                    rowStyler:rowStyler,
                    idField:'id',
                    fit:true">
                <thead>
                <tr>
                    <th data-options="field:'collection_state',width:80,align:'center',formatter:formatterCollection">收藏</th>
                    <th data-options="field:'id',width:80,align:'center',formatter:formatterAttachment">附件</th>
                    <th data-options="field:'attachment_size',width:120,align:'center'">附件大小(M)</th>
                    <th data-options="field:'title',width:250,align:'center'">标题</th>
                    <th data-options="field:'validity_date',width:100,align:'center'">有效期</th>
                    <th data-options="field:'release_person',width:100,align:'center'">发布人</th>
                    <th data-options="field:'tag_name',width:100,align:'center'">标签</th>
                    <th data-options="field:'release_time',width:160,align:'center'">发布日期</th>
                    <th data-options="field:'update_time',width:160,align:'center'">更新日期</th>
                </tr>
                </thead>
            </table>
        </div>
    </div>
</div>


<div class="easyui-dialog" id="downloadDialog" title="下载附件" style="padding:10px" data-options="height: 'auto',
            top: 20,
            modal: true,
            closed: true,
            inline: true,
            buttons:[{
				text:'下载',
				handler:gotoDownload
			}]">
    <div class="easyui-panel" style="width:400px;padding:20px 60px">
        <div style="margin-bottom:10px">
            <input type="checkbox" name="downloadUrl"/>&nbsp;&nbsp;附件1
        </div>
        <div style="margin-bottom:10px">
            <input type="checkbox" name="downloadUrl"/>&nbsp;&nbsp;附件2
        </div>
    </div>
</div>

<script>
    function rowStyler(index, row) {
        if (row.readState == "0") {
            return 'font-weight:bold;';
        }
    }
    function formatterCollection(value, row, index) {
        if (value) {
            return "<a href='javascript:void(0);'>" + (row.collection_state == "0" ? "未收藏" : "已收藏") + "</a>"
        }
    }
    function formatterAttachment(value, row, index) {
        return "<a href='javascript:void(0);' onclick='downloadAttachment();'>下载</a>"
    }
    function downloadAttachment() {
        $("#downloadDialog").dialog('open');
    }
    function gotoDownload() {

    }

    function showDoloadDialog() {
        $("#showDoloadDialog").dialog('open');
    }

</script>